from django.conf.urls.defaults import *
from ponto_eletronico.ponto.views import index
from ponto_eletronico.ponto.views import fadmin
from ponto_eletronico.ponto import settings as psettings

from django.contrib import admin
from django.conf import settings
admin.autodiscover()

def troca_senha_indisponivel(request):
	from django.http import HttpResponse
	return HttpResponse('A troca de senha está indisponivel no momento.','text/plain')


urlpatterns = patterns('',
     (r'^'+psettings.PONTO_URL+'admin/password_change/',troca_senha_indisponivel),
     (r'^'+psettings.PONTO_URL+'admin/(.*)', fadmin),
     (r'^'+psettings.PONTO_URL+'$', index),
     (r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
     (r'$','django.views.generic.simple.redirect_to',{'url':'/ponto/'}),

)
